﻿// Based on http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/
// Updated by Anvaka

namespace ContextMenuControls
{
    internal static class ContextMenuManager
    {
        private static ContextMenu _currentMenu;

        internal static ContextMenu CurrentMenu
        {
            set 
            {
                if (_currentMenu != null && _currentMenu != value)
                    _currentMenu.IsOpen = false;

                _currentMenu = value; 
            }
        }
    }
}
